/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package DBFunction;

import java.sql.ResultSet;
import java.sql.SQLException;

public class fFirstLogin {
	public static boolean process(String currentPhoneNumber) {
		String sql = "select	COUNT(UserId)	"
				+ "from buddytracking.position "
				+ "where UserId = (select UserId from buddytracking.user where PhoneNumber='"
				+ currentPhoneNumber + "')";
		ResultSet resultSet = DB.connectDB.ExecuteQuery(sql);
		boolean result = false;
		try {
			while (resultSet.next()) {
				if (resultSet.getString("COUNT(UserId)").equals("0")) {
					result = true;
				}
			}
		} catch (SQLException ex) {

		}
		return result;
	}
}
